/*
* Copyright 2002-2007 Peter Lin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*   http://ruleml-dev.sourceforge.net/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* 
*/
using System;

namespace Creshendo.Util.Rete
{
    /// <author>  Peter Lin
    /// *
    /// This is a base class the defines the common fields like lazy and
    /// strategy for the activation list. Creating new activationList
    /// implementations should extend this class.
    /// 
    /// </author>
    [Serializable]
    public abstract class AbstractActivationList : IActivationList
    {
        protected internal bool lazy = false;
        protected internal IStrategy stratey = null;
        public abstract bool AscendingOrder { get; }

        #region ActivationList Members

        public virtual IStrategy Strategy
        {
            get { return stratey; }

            set { stratey = value; }
        }

        public virtual bool Lazy
        {
            get { return lazy; }

            set { lazy = value; }
        }

        public abstract IActivation nextActivation();

        public abstract void addActivation(IActivation act);

        public abstract IActivation removeActivation(IActivation act);

        public abstract void clear();

        public abstract int size();

        public abstract IActivationList cloneActivationList();

        #endregion
    }
}